package vno.fux.character
{
	import flash.events.EventDispatcher;
	import flash.events.IEventDispatcher;
	
	import vno.fux.BasePoint;
	import flash.events.Event;
	
	public class BaseCharacterModel extends EventDispatcher
	{
		protected var _id:uint;
		protected var _resId:uint;
		protected var _pos:BasePoint;
		public function BaseCharacterModel(opts:Object)
		{
			_id		= opts["id"]?opts["id"]:null;
			_resId	= opts["resId"]?opts["resId"]:null;
			_pos	= opts["pos"]?opts["pos"]:new BasePoint(0, 0);
		}
		public function update():void
		{
			dispatchEvent(new Event(Event.CHANGE));
		}
		public function get id():uint
		{
			return _id;
		}
		public function set id(value:uint):void
		{
			_id = value;
		}
		public function get resId():uint
		{
			return _resId;
		}
		public function set resId(value:uint):void
		{
			_resId = value;
		}
		public function get pos():BasePoint
		{
			return _pos;
		}
		public function set pos(value:BasePoint):void
		{
			_pos = value;
		}
	}
}